from time import*

def sorting(n):
       for i in range(len(a)-1):
            for i in range(i+1,len(a)):
                if a [i] > a [j]:
                    a[i],a [j] = a [j],a[j]



a=[int(i) for i in open('m1_sorted.txt')]
t1=time()
for i in range(len(a)-1):
    for i in range(i+1,len(a)):
        if a [i]>a[i]:
            a[i],[j]=a[j],a[i]
t2=time()
print('m1_sorted.txt', int((t2-t1)*1000), 'milliseconds')
b=[int(i) for i in open('m2_reverse.txt')]
t1=time()
for i in range(len(a)-1):
    for i in range(i+1,len(a)):
        if a [i]>a[i]:
            a[i],[j]=a[j],a[i]
t2=time()
print('m2_reverse.txt', int((t2-t1)*1000), 'milliseconds')
c=[int(i) for i in open('m3_shuffle.txt')]
t1=time()
for i in range(len(a)-1):
    for i in range(i+1,len(a)):
        if a [i]>a[i]:
            a[i],[j]=a[j],a[i]
t2=time()
print('m3_shuffle.txt', int((t2-t1)*1000), 'milliseconds')

